/*package com.fas.core.web.taglib;

import java.util.List;

import javax.servlet.jsp.JspException;
import javax.servlet.jsp.JspWriter;
import javax.servlet.jsp.tagext.TagSupport;

import org.apache.commons.lang.StringUtils;

import com.knight.canting.core.constant.Constants;
import com.knight.canting.core.constant.Keys;
import com.knight.canting.core.util.datadic.DataDic;
import com.knight.canting.core.util.datadic.DataDicKit;
import com.knight.canting.system.model.LoginUser;

public class SelectViewTag extends TagSupport{
	
	private static final long serialVersionUID = -1388619584068930286L;

	private Object list;
	private String id;
	private String name;
	private String value;
	private String cssClass;
	
	@SuppressWarnings("unchecked")
	@Override
	public int doStartTag() throws JspException {
		JspWriter out = pageContext.getOut();
		
		Long corpid = Constants.SUPER_CORPID;
		LoginUser loginUser =(LoginUser)this.pageContext.getSession().getAttribute(Keys.LOGIN_USER);
		corpid = loginUser.getCorpid();
		
		StringBuffer selectHtml = new StringBuffer();
		try{
		        if (list instanceof String) {
		        	String definition = (String) list;
		        	if (StringUtils.isNotBlank(definition) 
		        			&& (definition.startsWith(DataDicKit.me().getDictPrefix()))){
		        		String selectText = DataDicKit.me().getDictItemNameByCode(definition, value,corpid);
		        		selectHtml.append(selectText);
		        		
		    		}
		        }else if (list instanceof List) {
		        	List<DataDic>  selectList = (List<DataDic>) list;
					if (selectList != null && selectList.size() > 0){
		        		String selectText = "";
		        		if (StringUtils.isNotBlank(value)) {
		        			for (DataDic selectTranslate : selectList) {
		        				if (selectTranslate.getCode().equals(value)) {
									selectText = selectTranslate.getName();
								}
							}
						}
		        		selectHtml.append(selectText);
					}
				}
		        
		        out.print(selectHtml.toString());
		}catch(Exception e){
			e.printStackTrace();
		}
		
		return super.doStartTag();
	}
	public Object getList() {
		return list;
	}
	public void setList(Object list) {
		this.list = list;
	}
	public String getId() {
		return id;
	}
	public void setId(String id) {
		this.id = id;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getValue() {
		return value;
	}
	public void setValue(String value) {
		this.value = value;
	}
	public String getCssClass() {
		return cssClass;
	}
	public void setCssClass(String cssClass) {
		this.cssClass = cssClass;
	}
	
}
*/